package sheshen.come.cn.sheshen.feature.ui;

import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.support.v4.view.ViewPager;
import android.view.View;

import java.util.Arrays;

import sheshen.come.cn.sheshen.R;
import sheshen.come.cn.sheshen.base.BaseActivity;
import sheshen.come.cn.sheshen.feature.adapter.GatherAdapter;

/**
 * Created by MyPC on 2017/2/27.
 * 收货activity
 */

public class GatherActivity extends BaseActivity  {

    @Override
    protected int getLayoutId() {
        return  R.layout.activity_gather;
    }

    private GatherAdapter  adapter;
    private TabLayout tabLayout;
    private ViewPager vp_newpost;

    @Override
    protected void initViews(Bundle savedInstanceState) {
        tabLayout = (TabLayout) findViewById(R.id.tab_essence);
        vp_newpost = (ViewPager) findViewById(R.id.vp_essence);
        String[] titles = getResources().getStringArray(R.array.shouhuo);
        adapter =
                new GatherAdapter(getSupportFragmentManager(), Arrays.asList(titles));
        this.vp_newpost.setAdapter(adapter);
        this.tabLayout.setupWithViewPager(this.vp_newpost);

    }

    @Override
    protected void initData() {


    }

    @Override
    protected void initListeners() {

    }
}
